using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmAssetLocation")]
    public class AssetLocation
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "LocationId", ResourceType = typeof(Resources.AssetLocationResource))]
        public int LocationId { get; set; }

		[DataMember, Display(Name = "AssetCode", ResourceType = typeof(Resources.AssetLocationResource))]
        public string AssetCode { get; set; }

        [ForeignKey("FromJobSite")]
		[DataMember, Display(Name = "FromJobSiteId", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> FromJobSiteId { get; set; }

		[ForeignKey("FromWh")]
		[DataMember, Display(Name = "FromWhId", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> FromWhId { get; set; }

		[DataMember, Display(Name = "FromOther", ResourceType = typeof(Resources.AssetLocationResource))]
        public string FromOther { get; set; }

		[ForeignKey("ToJobSite")]
		[DataMember, Display(Name = "ToJobSiteId", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> ToJobSiteId { get; set; }

		[ForeignKey("ToWh")]
		[DataMember, Display(Name = "ToWhId", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> ToWhId { get; set; }

		[DataMember, Display(Name = "ToOther", ResourceType = typeof(Resources.AssetLocationResource))]
        public string ToOther { get; set; }

		[DataMember, Display(Name = "LocationStartDate", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<System.DateTime> LocationStartDate { get; set; }

		[DataMember, Display(Name = "LocationEndDate", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<System.DateTime> LocationEndDate { get; set; }

		[DataMember, Display(Name = "Remark", ResourceType = typeof(Resources.AssetLocationResource))]
        public string Remark { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.AssetLocationResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.AssetLocationResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember]
		public virtual HRM.JobSite FromJobSite { get; set; }

        [DataMember]
		public virtual HRM.Employee FromWh { get; set; }

        [DataMember]
		public virtual HRM.JobSite ToJobSite { get; set; }

        [DataMember]
		public virtual HRM.Employee ToWh { get; set; }

    }
}